
const Service = require("egg").Service

const User = require("../model/user")

class UserModel extends Service {
  createUser(data){
    //console.log("UserModel中的数据如下",data)
    console.log("user对象",new User())
    let temp = new User()
    let res = {
      user:{}
    }
    for(let key in data){
      if(key in temp){
        res.user[key] = data[key]
      }else{
        res[key] = data[key]
      }
    }
    console.log(res)
  }
}

module.exports = UserModel